#include "StdAfx.h"
#include ".\Player.h"
using namespace gameWorld;

CPlayer::CPlayer()
{
	m_accountID = 0; m_roleID=0; m_heroID=0;
	m_name[0]='\0'; 
	m_loginState = state::CreateState<state::CLogin>();
}
CPlayer::~CPlayer( )
{
	state::ReleaseState(m_loginState);
}
void	CPlayer::OnLogin( )	
{
	//m_stateManager.SetState(&m_stand); 
	SetState(m_stand);
}
void	CPlayer::OnInit(protocol::PlayerBaseInfo& baseInfo)
{
	m_roleID = baseInfo.roleID;
	m_heroID = baseInfo.heroID;
	fge::fge_strcpy( m_name,baseInfo.heroName );
}